var xPrev = $('.x_prev'),xNext = $('.x_next'),oUl = $('.x_center ul'),oNum = 0;
var oli = oUl.children('li'),uHeight = oUl.height();
oUl.append(oli.eq(0).clone());
var oSize = oUl.children('li').size(),oWidth = oli.eq(0).width();
$('.x_center ul li img').each(function(){
	var this_height = $(this).height(),c_height=0;
	if(this_height<uHeight){
		c_height = uHeight-this_height;
	console.log(c_height)
		$(this).css('margin-top',c_height/2);
	};
});
xNext.click(function(event){
event.preventDefault();
	oNum ++;
	x_tab();
});
xPrev.click(function(event){
event.preventDefault();
	oNum --;
	x_tab();
});
function x_tab(){
	if(oNum>=oSize){
		oUl.css('margin-left',0);
		oNum = 1;
	}else if(oNum<0){
		oUl.css('margin-left',-oWidth*(oSize-1));
		oNum = oSize-2;
	};
	oUl.stop().animate({'margin-left':-oWidth*oNum},500);
};
